@extends('layouts.base')  

@section('content')
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		用户管理
		<span class="c-gray en">&gt;</span>
		用户列表 <a class="btn btn-primary radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			
			<div>
				<form method="get" action="/system/user/index">
					昵称：<input type="text" class="input-text" style="width:120px" placeholder="输入微信昵称" id="nickName" name="nickName">
					 日期范围：
					<input name="start_time" type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
					-
					<input name="end_time" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;">
					<button type="submit" class="btn btn-primary" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
				</form>
			</div>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<!--<span class="l"> 
					<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
					<a href="/system/admin/add" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加管理员</a> 
				</span>-->
				<!--<span class="r">共有数据：<strong>54</strong> 条</span>-->
			</div>
			<table class="table table-border table-bordered table-bg">
				<thead>
					<tr>
						<th scope="col" colspan="7">用户列表</th>
					</tr>
					<tr class="text-c">
						<th width="25"><input type="checkbox" name="" value=""></th>
						<th width="40">ID</th>
						<th width="150">昵称</th>
						<th width="130">头像</th>
						<th width="130">性别</th>
						<th width="130">城市</th>
						<th width="130">添加时间</th>
					</tr>
				</thead>
				<tbody>
					
					@if($data['code'] == 1)		
					@foreach ($data['data'] as $item)
						<tr class="text-c">
							<td><input type="checkbox" value="1" name=""></td>
							<td>{{$item->id}}</td>
							<td>{{$item->nickName}}</td>
							<td><img height="50" src="{{$item->avatarUrl}}"/></td>
							<td>{{$item->gender_txt}}</td>
							<td>{{$item->country}}</td>
							<td>{{$item->created_at}}</td>	
						</tr>
					@endforeach	
									
					@else
						<tr>
							<td colspan="7" style="text-align: center;">{{$data['msg']}}</td>
						</tr>
					@endif					
					
					
				</tbody>
			</table>
			
				@if($data['data']->hasPages())
					<tfoot>
						<tr>
							<th colspan="7">
								{{ $data['data']->appends(request()->all())->links() }}
							</th>
						</tr>
					</tfoot>
				@endif
		</article>
	</div>
</section>
@endsection




@section('script')
	<script type="text/javascript" src="/HadminPage/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
	<script type="text/javascript" src="/HadminPage/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
	<script type="text/javascript" src="/HadminPage/lib/laypage/1.2/laypage.js"></script> 
@endsection







